package com.example.dbflow5demo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.cupster.func_db_dbflow5.db_main.crud.UserHelper;
import com.cupster.func_db_dbflow5.db_main.table.User;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        User user = new User();
        user.setAccount("18960");
        user.setAge(27);
        user.setLoginMill(System.currentTimeMillis());
        user.setName("Cupster");
        user.setPassword("a123456");
        user.insert();

        String account = UserHelper.queryByName("Cupster");
        Log.e(this.getClass().getSimpleName(), "name:"+user.getName() +" | user.account:"+ account);
    }
}